package com.paper.tiger.easy.rpc.s.client.client;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

import java.lang.reflect.Proxy;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/5/31 11:00
 * @since JDK 1.8
 */
public class ProxyFactoty
{


    public static <T>T newProxy(Class<T> clazz){

        return (T) Proxy.newProxyInstance(clazz.getClassLoader(),new Class[]{clazz},new ProxyInstance(clazz));
    }


}
